<script setup>
  const props = defineProps({
    detail: {
      type: [Number, String]
    }
  })
  const edit = () => {
    // const ec = uni.utils.getCurrentPage().getOpenerEventChannel()
    // ec.emit('listEdit', { id: props.detail, name: '李四' })
    uni.$emit('listEdit', { id: props.detail, name: '李四' })
    uni.navigateBack()
  }
</script>
<template>
  {{ detail }}
  <button @click="edit">编辑</button>
</template>

<style></style>
